package com.baidu.videoseries.activity;

import android.net.Uri;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;

import com.baidu.videoseries.ToolbarActivity;
import com.baidu.videoseries.R;
import com.baidu.videoseries.constant.Config;


public class VideoViewActivity extends ToolbarActivity {
    private VideoView vv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_video_view);
        initView();
    }

    private void initView() {
        vv = (VideoView) this.findViewById(R.id.vv);
        vv.setMediaController(new MediaController(this));
        Uri uri = Uri.parse(Config.Urls.VV_TEST);
        vv.setVideoURI(uri);
//        vv.setVideoPath(Urls.LOCAL_BM);
        vv.start();
        vv.requestFocus();
    }
}
